﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>中国传媒大学设备预约平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="{$projectUrl}/css/admin_style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{$projectUrl}/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{$projectUrl}/js/jquery.cycle.all.min.js"></script>
<script type="text/javascript">
{literal}
$(document).ready(function(){
    $('#slideshow').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 3000,
        pager:  '#slider_nav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#slider_nav li:eq(' + (idx) + ') a';
        }
    });
});
{/literal}
</script>
</head>
<body>
<div class="main">
  <div class="main_resize">
    <div class="main_left">
      {include file=include/headerLogo.html}
      <div class="clr"></div>
      {include file=include/adminLeftMenu.html}
      <div class="clr"></div>
      <h2>&nbsp;</h2><!--
      <h2>Our News</h2>
      <p><span>12 Dec 2015 | 0 comments</span><br />
        <strong>Duis nec porttitor lorem</strong><br />
        Mauris et nisi urna nonfaucibus magna. Integer lacus ante then ullamcorper ut vulputate..</p>
      <p><span>14 Dec 2015 | 0 comments</span><br />
        <strong>Duis nec porttitor lorem</strong><br />
        Mauris et nisi urna nonfaucibus magna. Integer lacus ante then ullamcorper ut vulputate..</p>
      <h2>&nbsp;</h2>
      <h2>What They Say</h2>
      <p>&quot;Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse voluptas nulla pariatur?&quot;</p>
      <p><em><strong>by: John S., webdesigner</strong></em></p>-->
    </div>
    <div class="main_right">
    	<!--
      <div class="login">
      	<p style="float:right"><a href="logout.html">退出{$projectDir}</a></p>
         <p style="float:right"><a href="person.html?target=message">站内信(0)</a></p>
          <p style="float:right"><a href="login.html">登录</a></p>

       </div>-->
       {include file=include/headerLogin.html}

      <div class="clr" style="background-color:#C63; height:1px;">&nbsp;</div>
      <div>
      {include file=include/adminTopMenu.html}
      </div>
      <div class="clr">
      	<p><img src="{$projectUrl}/images/add2.jpg" width="30px" height="20px"><span style="font-color:#C60; font-size:16px;">添加班级</span>(总个数:{$classNumber})</p>
      	 <!--创建班级-->
                <div id = "create_class_name" style="font-size:14px;">
                <form action="class.php" method="post">
                <input type="hidden" name="action" id="action" value="addclass"/>
                    <table bgcolor="#FFFFFF" width="100%">
                    	<tr>
                    		<td>*班级名字</td>
                    		<td>班级介绍</td>
                    		<td>班长学号</td>
                    		<td>班主任编号</td>
                    		<td>添加</td>
                    	</tr>
                    	<tr>
                    		<td><input type="text" id="name" name="name" size="14"/></td>
                    		<td><input type="text" id="info" name="info" size="14"/></td>
                    		<td><input type="text" id="monitor" name="monitor" size="10"/></td>
                    		<td><input type="text" id="teacher" name="teacher" size="10"/>
                    		</td>
                    		<td><input type="image" src="{$projectUrl}/images/add1.jpg" class="button"/></td>
                    	</tr>
                    </table>
                </form>
                </div>
                <!--创建用户结束-->
      </div>

      <!-- 搜索班级并且进行修改 -->
      <div class="clr">
       <!--全部班级的列表-->
                <div>
                	<p>
                		<span>{if $searchNote eq ""}输入名字,班长学号或者班主任学号进行搜索
                		{else}{$searchNote}
                		{/if}
                		</span>
                		<span style="float:right">
					        <form id="form1" name="form1" method="get" action="class.php">
					        	 <input type="hidden" name="action" id="action" value="search"/>
                                <input type="text" class="keywords" id="keyword" name="keyword" maxlength="50" value="{$keyword}"/>
                                <input name="b" type="submit" class="button" value="搜索" />
					        </form>
					        </span></p>
                <form id="userlist_form" action="class.php" method="post" onsubmit="return window.confirm('确定删除？');">
                <input type="hidden" name="action" id="action" value="deleteclass"/>
                    <table width="100%" bgcolor="#FFFFFF" style="font-size:14px;" >
                    <tr valign="top" style="background-color:#C60">
                        <td>选择</td>
                        <td>班级</td>
                        <td>班级介绍</td>
                        <td>班长学号</td>
                        <td>班主任</td>
                        <td>编辑</td>
                    </tr>
                    {foreach from=$classes item=class name=classlist }
                    <tr valign="top"  onmouseout="this.style.backgroundColor=''"onmouseover="this.style.backgroundColor='#AAAAAA'">
                        <td><input type="checkbox" id="classid[]" name="classid[]" value="{$class.id}" size="2"/></td>
                        <td>{$class.name}</td>
                        <td>{$class.info}</td>
                        <td>{$class.monitorid}</td>
                        <td>{$class.teacherid}</td>
                        <td><a href="class.php?action=edit&id={$class.id}">编辑</a></td>
                    </tr>
                    {/foreach}


                    <tr><td align="left" colspan="1">
                        <input type="button" value="全选" onclick='chkall("userlist_form")' />

                        </td>
                        <td align="left" colspan="1">
                        <input type="reset" value="不选" />
                      	</td>
                        <td align="left" colspan="4">
                        <input type="submit" value="删除选中"/>
                        </td>
                    </tr>
                     <tr>
                    <td colspan="6" align="center">
                    <!-- 分页 -->
                        <a href="class.php?pageIndex={$leftPageIndex}">&lt;</a>

                    {section start=$leftMostPageIndex loop=$pageIndex step=1 name=pagesection}
                    <a href="class.php?pageIndex={$smarty.section.pagesection.index}">
                    {$smarty.section.pagesection.index}&nbsp;&nbsp;
                    </a>
                    {/section}
                    <span style="font-size:18px;"><Strong><bold>{$pageIndex}</bold></Strong>&nbsp;</span>
                    {section start=$pageIndex+1 loop=$rightMostPageIndex+1 step=1 name=rightpagesection}
                    <a href="class.php?pageIndex={$smarty.section.rightpagesection.index}">
                    {$smarty.section.rightpagesection.index}&nbsp;&nbsp;
                    </a>
                    {/section}

                    <a href="class.php?pageIndex={$rightPageIndex}">&gt;</a>
                    <!-- 分页 -->
                    </td>
                    </tr>
                    </table>
                </form>
                </div>
                <!--全部用户的列表-->
      </div>
      <!-- 搜索班级并且进行修改 结束-->
      <div class="clr"></div>
      <!-- 编辑用户 -->
      <div class="clr">
      	<p><img src="{$projectUrl}/images/img_1.jpg" width="30px" height="30px"><span style="font-color:#C60; font-size:16px;">编辑班级</span></p>
                <div id = "modify_user" style="font-size:14px;">
                <form action="class.php?action=edit&id={$oneclassinfo[0].id}" method="post">
                <input type="hidden" name="action" id="action" value="modifyclass"/>
                <input type="hidden" name="classid" id="classid" value="{$oneclassinfo[0].id}"/>
                    <table bgcolor="#FFFFFF" width="100%">
                    	<tr>
                    		<td>班级</td>
                    		<td>介绍</td>
                    		<td>班长</td>
                    		<td>班主任</td>
                    		<td>保存</td>
                    	</tr>
                    	<tr>
                    		<td><input type="text" id="name" name="name" size="14" value="{$oneclassinfo[0].name}"/></td>
                    		<td><input type="text" id="info" name="info" size="14" value="{$oneclassinfo[0].info}"/></td>
                    		<td><input type="text" id="monitor" name="monitor" size="10" value="{$oneclassinfo[0].monitorid}"/></td>
                    		<td><input type="text" id="teacher" name="teacher" size="10" value="{$oneclassinfo[0].teacherid}"/></td>
                    		<td><input type="image" src="{$projectUrl}/images/save.jpg" class="button"/></td>
                    	</tr>
                    </table>
                </form>
                </div>
      </div>
      <!-- 编辑用户结束 -->

    </div>
    <div class="clr"></div>
  </div>
  <div class="footer">
    {include file=include/footer.html}
  </div>
</div>
<div align=center></div></body>
</html>
